<template>
  <div>
    <div v-if="this.teacherBaseInfo.teacherType != '1-1'">
      <TeacherCoreAssessmentResult  :user-name="userName" :query-date="queryDate"></TeacherCoreAssessmentResult>
    </div>
    <div v-else>
      <a-tabs default-active-key="1" >
        <a-tab-pane v-for="pane in panes" :key="pane.item_value" :tab="pane.item_text" >
          <TeacherYearAssessmentResult v-if=" pane.item_value == '1'" :user-name="userName" :query-date="queryDate"></TeacherYearAssessmentResult>
          <TeacherCoreAssessmentResult v-else-if="pane.item_value == '2'" :user-name="userName" :query-date="queryDate"></TeacherCoreAssessmentResult>
        </a-tab-pane>
      </a-tabs>
    </div>

  </div>

</template>

<script>
import '@/assets/less/TableExpand.less'
import TeacherCoreAssessmentResult from '@views/dashboard/gfxy/assessmentResult/coreAssessment/TeacherCoreAssessmentResult.vue'
import TeacherYearAssessmentResult
  from '@views/dashboard/gfxy/assessmentResult/yearAssessment/TeacherYearAssessmentResult.vue'
import Vue from 'vue'
import { TEACHER_BASE_INFO } from '@/store/mutation-types'

export default {
  name: 'IndexTeacher',
  components: { TeacherCoreAssessmentResult,TeacherYearAssessmentResult },
  props: {
    userName: {
      type: String,
      required: true
    },
    queryDate: {
      type: String,
      required: true
    }
  },
  data () {
    return {
      teacherBaseInfo:{}
    }
  },
  created() {
    this.getTitles();
  },
  computed: {

  },
  methods: {

    getTitles(){
      this.panes = [
        {
          item_text:'教职工绩效考核积分',
          item_value:'1',
        },{
          item_text:'发展关键核心指标积分',
          item_value:'2',
        }
      ]
    }
  },
  mounted() {
    this.teacherBaseInfo = Vue.ls.get(TEACHER_BASE_INFO);
  }
}
</script>

<style lang="less" scoped>

</style>